package com.smart.car.record.client.fallback;

import com.smart.car.common.res.bean.ResponseResult;
import com.smart.car.common.res.exception.BusinessException;
import com.smart.car.record.client.MessageClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class MessageClientFallback implements MessageClient {

	@Override
	public ResponseResult<Integer> sendNotice(String json) throws BusinessException {
		ResponseResult<Integer> result = new ResponseResult<>();
		result.setMsg("调用消息服务失败...");
		result.setData(-1);
		log.warn("调用message服务失败，触发failback策略...");
		return result;
	}

}
